$(function(){
    function setIframeHeight(iframe) {
        if (iframe) {
            var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
            if (iframeWin.document.body) {
                iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
            }
        }
    };
    window.onload = function () {
        setIframeHeight(document.getElementById('external-frame'));
        console.log($("external-frame").height());
    };
    $(".nav.navbar-right > li > a").on("click",function(){
        var src = $(this).attr("id-data");
        $("#external-frame").attr("src",src);
    });
});